<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
      
      

    <body>

        <ui:composition template="./../templates/templateMain.xhtml">

            <ui:define name="content">

                <p:panel header="#{backingProduto.descricao}">
                    <h:form>
                        <p:dataTable id="basic" var="p" value="#{backingProduto.listaProdutosParametrizada}"  paginator="true" rows="15">  
                            <p:column id="modelHeader">  
                                <f:facet name="header">  
                                    Categoria   
                                </f:facet>  
                                <h:outputText value="#{p.categoria}" />  
                            </p:column>  

                            <p:column>  
                                <f:facet name="header">  
                                    Descrição
                                </f:facet>  
                                <h:outputText value="#{p.descricaoProduto}" />  
                            </p:column>  

                            <p:column>  
                                <f:facet name="header">  
                                    Nome
                                </f:facet>  
                                <h:outputText value="#{p.nomeProduto}" />  
                            </p:column>  

                            <p:column>  
                                <f:facet name="header">  
                                    Preço  
                                </f:facet>  
                                <h:outputText value="#{p.precoProduto}" />  
                            </p:column>  

                            <!--p:column>  
                                <f:facet name="header"/>  
                                <h:graphicImage value="#{p.caminhoImage}"/>
                            </p:column--> 
                            
                            <p:column>  
                                <f:facet name="header"/>  
                                <p:commandButton value="Comprar" action="#{backingProduto.prepararAdicionarProduto()}" />  
                            </p:column>  
                            
                            <!--p:column>  
                                <f:facet name="header"/>  
                                <h:commandButton image="/resources/img/icons/pesquisa.png" />  
                            </p:column> 
                            
                            <p:column>  
                                <f:facet name="header"/>  
                                <h:commandButton image="/resources/img/icons/pesquisa.png" />  
                            </p:column--> 
                            

                        </p:dataTable>  
                    </h:form>
                </p:panel>
            </ui:define>
        </ui:composition>

    </body>
</html>
